<template>
    <div>
        <el-form  label-width="80px" ref="form" :model="pageAbout"style="margin-left:80px;margin-top:50px" :label-position="labelPosition">
            <el-form-item prop="contact_state" label="企业logo">
                <img :src="allMessage.ctmEnterprise.enterprise_logo" alt="">
            </el-form-item>
            <el-form-item prop="logo_state" label="企业名称">
            {{allMessage.ctmEnterprise.enterprise_name}}
            </el-form-item>
            <el-form-item prop="case_relation" label="企业介绍">
                {{allMessage.ctmEnterprise.company_introduce}}
            </el-form-item>
            <el-form-item prop="operator" label="合作成果">
                {{allMessage.ctmEnterprise.cooperate_achievements}}
            </el-form-item>
            <el-form-item prop="enterprise_name" label="案例">
                <!--{{allMessage.projectCase.project_name}}-->
                <span v-for="item in allMessage.projectCase">{{item.project_name}}</span>
            </el-form-item>
            <el-form-item  label="碳银评价">
                {{allMessage.ctmEnterprise.company_evaluate}}
            </el-form-item>
        </el-form>
        <h4 style="margin-left:80px">能力画像</h4>
        <template>
            <!--设计-->
            <!--@tab-click="handleClick"-->
            <el-tabs v-model="activeName2" type="card"  style="margin-left:80px;width:800px" v-if="allMessage.ctmEnterprise.has_design_ability">
                <el-tab-pane label="设计" name="first">
                    <el-row :gutter="20">
                        <el-col :span="14">
                            <el-form  :label-position="labelPosition" label-width="100px" ref="form" :inline="true" :model="pageAbout"style="margin-left:0px;margin-top:0px"position="left">
                                <el-form-item prop="contact_state" label="资质类别:">
                                    {{allMessage.design_zizhi_type}}
                                </el-form-item>
                                <el-form-item prop="logo_state" label="资质颁发单位:">
                                    {{allMessage.construct_zizhi_award_unit}}
                                </el-form-item>
                                <el-form-item prop="case_relation" label="资质等级:">
                                    {{allMessage.design_zizhi_level}}
                                </el-form-item>
                                <el-form-item prop="operator" label="专业领域:">
                                    {{allMessage.design.major_field}}
                                </el-form-item>
                                <el-form-item prop="enterprise_name" label="收费标准:">
                                    {{allMessage.design.charge_standard}}
                                </el-form-item>
                            </el-form>
                        </el-col>
                        <el-col :span="6">
                            <h4>评价星级</h4>
                            <h6>{{allMessage.design.evaluate_star}}</h6>
                        </el-col>
                    </el-row>
                </el-tab-pane>
                <!--咨询-->
                <el-tab-pane label="咨询" name="second" v-if="allMessage.ctmEnterprise.has_consult_ability">
                    <el-row :gutter="20">
                        <el-col :span="14">
                            <el-form :label-position="labelPosition" label-width="100px" ref="form" :inline="true" :model="pageAbout"style="margin-left:0px;margin-top:0px">
                                <el-form-item prop="contact_state" label="资质类别：">
                                    {{allMessage.consult_zizhi_type}}
                                </el-form-item>
                                <el-form-item prop="logo_state" label="资质颁发单位：">
                                    {{allMessage.consult_zizhi_award_unit}}
                                </el-form-item>
                                <el-form-item prop="case_relation" label="资质等级：">
                                    {{allMessage.consult_zizhi_type}}
                                </el-form-item>
                                <!--arr-->
                                <el-form-item prop="operator" label="专业领域：">
                                    <span v-for="item in allMessage.consult.major_field" style="display: inline-block;margin-right:3px">{{item}}</span>

                                    <!--{{allMessage.consult.major_field}}-->
                                </el-form-item>
                                <el-form-item prop="enterprise_name" label="收费标准：">
                                    {{allMessage.consult.charge_standard}}
                                </el-form-item>
                            </el-form>
                        </el-col>
                        <el-col :span="6">
                            <h4>评价星级</h4>
                            <h6>{{allMessage.consult_evaluate_star}}</h6>
                        </el-col>
                    </el-row>
                </el-tab-pane>
                <!--承建-->
                <el-tab-pane label="承建" name="third" v-if="allMessage.ctmEnterprise.has_construct_ability">
                    <el-row :gutter="20">
                        <el-col :span="14">
                            <el-form :label-position="labelPosition" label-width="100px" ref="form" :inline="true" :model="pageAbout"style="margin-left:0px;margin-top:0px">
                                <el-form-item prop="contact_state" label="资质颁发单位：">
                                    {{allMessage.construct_zizhi_award_unit}}
                                </el-form-item>
                                <el-form-item prop="logo_state" label="技术团队资源：">
                                    {{allMessage.construct.technology_team_resource}}
                                </el-form-item>
                                <el-form-item prop="case_relation" label="资质等级：">
                                    {{allMessage.construct_zizhi_level}}
                                </el-form-item>
                                <!--arr-->
                                <el-form-item prop="operator" label="专业领域：">
                                    <span v-for="item in allMessage.construct.major_field" style="display: inline-block;margin-right:3px">{{item}}</span>
                                    <!--{{allMessage.construct.major_field}}-->
                                </el-form-item>
                                <el-form-item prop="enterprise_name" label="收费标准：">
                                    {{allMessage.construct.charge_standard}}

                                </el-form-item>
                                <!--arr-->
                                <el-form-item prop="enterprise_name" label="主营业务：">
                                    <!--{{allMessage.construct.main_business}}-->
                                    <span v-for="item in allMessage.construct.main_business" style="display: inline-block;margin-right:3px">{{item}}</span>
                                </el-form-item>
                                <el-form-item prop="enterprise_name" label="施工担保方式：">
                                    <!--{{allMessage.construct_assure_method}}-->
                                    <span v-for="item in allMessage.construct_assure_method" style="display: inline-block;margin-right:3px">{{item}}</span>

                                </el-form-item>
                                <el-form-item prop="enterprise_name" label="特殊能力：">
                                    <!--arr-->
                                    <!--{{allMessage.construct_special_ability}}-->
                                    <span v-for="item in allMessage.construct_special_ability" style="display: inline-block;margin-right:3px">{{item}}</span>
                                </el-form-item>
                                <el-form-item prop="enterprise_name" label="业务区域：">
                                    <!--arr-->
                                    <!--{{allMessage.construct_business_area}}-->
                                    <span v-for="item in allMessage.construct_business_area" style="display: inline-block;margin-right:3px">{{item}}</span>
                                </el-form-item>
                            </el-form>
                        </el-col>
                        <el-col :span="6">
                            <h4>评价星级</h4>
                            <h6>{{allMessage.construct_evaluate_star}}</h6>
                        </el-col>
                    </el-row>
                </el-tab-pane>
                <!--设备供应-->
                <el-tab-pane label="设备供应" name="fourth" v-if="allMessage.ctmEnterprise.has_device_supply_ability">
                    <el-row :gutter="20">
                        <el-col :span="14">
                            <el-form :label-position="labelPosition" label-width="100px" ref="form" :inline="true" :model="pageAbout"style="margin-left:0px;margin-top:0px">
                                <el-form-item prop="contact_state" label="主营设备：">
                                    <!--arr-->
                                    <!--{{allMessage.device_main_equipment}}-->
                                    <span v-for="item in allMessage.device_main_equipment" style="display: inline-block;margin-right:3px">{{item}}</span>
                                </el-form-item>
                                <el-form-item prop="logo_state" label="企业知名度：">
                                    {{allMessage.device_enterprise_popularity}}
                                </el-form-item>
                                <el-form-item prop="case_relation" label="市场占有率：">
                                    {{allMessage.device.market_share}}
                                </el-form-item>
                                <el-form-item prop="operator" label="销售方式：">
                                    <!--arr-->
                                    <!--{{allMessage.device_sale_way}}-->
                                    <span v-for="item in allMessage.device_sale_way" style="display: inline-block;margin-right:3px">{{item}}</span>
                                </el-form-item>
                                <el-form-item prop="enterprise_name" label="售后网络覆盖区域：">
                                    <!--arr-->
                                    <!--{{allMessage.device_sh_network_cover_region}}-->
                                    <span v-for="item in allMessage.device_sh_network_cover_region" style="display: inline-block;margin-right:3px">{{item}}</span>
                                </el-form-item>
                            </el-form>
                        </el-col>
                        <el-col :span="6">
                            <h4>评价星级</h4>
                            <h6>{{allMessage.device_evaluate_star}}</h6>
                        </el-col>
                    </el-row>
                </el-tab-pane>
                <!--投资-->
                <el-tab-pane label="投资" name="sixth" v-if="allMessage.ctmEnterprise.has_invest_ability">
                    <el-row :gutter="20">
                        <el-col :span="14">
                            <el-form :label-position="labelPosition" label-width="100px" ref="form" :inline="true" :model="pageAbout"style="margin-left:0px;margin-top:0px">
                                <el-form-item prop="contact_state" label="有投资能力">

                                </el-form-item>

                            </el-form>
                        </el-col>
                        <el-col :span="6">
                            <h4>评价星级</h4>
                            <h6>{{allMessage.invest_evaluate_star}}</h6>
                        </el-col>
                    </el-row>
                </el-tab-pane>
                <!--运维-->
                <el-tab-pane label="运维" name="seventh" v-if="allMessage.ctmEnterprise.has_operation_ability">
                    <el-row :gutter="20">
                        <el-col :span="14">
                            <el-form :label-position="labelPosition" label-width="100px" ref="form" :inline="true" :model="pageAbout"style="margin-left:0px;margin-top:0px">
                                <el-form-item prop="contact_state" label="主营业务：" class="instance">
                                    {{allMessage.operation.main_business}}
                                </el-form-item>
                                <el-form-item prop="logo_state" label="企业优势：">
                                    {{allMessage.operation.enterprise_advantage}}
                                </el-form-item>
                                <el-form-item prop="case_relation" label="运维补差能力：">
                                    {{allMessage.operation.operation_bc_ability}}
                                </el-form-item>
                                <el-form-item prop="operator" label="业务区域：">
                                    <!--arr-->
                                    <!--{{allMessage.operation_business_region}}-->
                                    <span v-for="item in allMessage.operation_business_region" style="display: inline-block;margin-right:3px">{{item}}</span>
                                </el-form-item>
                            </el-form>
                        </el-col>
                        <el-col :span="6">
                            <h4>评价星级</h4>
                            <h6>{{allMessage.operation_evaluate_star}}</h6>
                        </el-col>
                    </el-row>
                </el-tab-pane>
            </el-tabs>
        </template>
        <el-button type="primary" @click="go" style="margin-left:80px;margin-top:80px">返回列表页</el-button>
    </div>
</template>
<script>
    import _http from '@/components/common/http.vue'
    import _param from '@/components/common/param.vue'
    export default {
        data() {
            return {
                labelPosition:'left',
                allMessage:{},
                activeName2: 'first',
                limit:'',
                userid:'',
                pageAbout:{
                    id:'',
                    userid:'',
                    title:'',
                    pageNumber:1,
                    pageSize:10,
                    operator:'',
                    contact_state:'',
                    logo_state:'',
                    case_relation:'',
                    enterprise_name:''
                },
                apiPort:{
//                  联络状态接口
                    stateApi:'ecology/chart/watchEnterprise',
                },
            }
        },
        mounted(){
            this.id = this.$route.query.info
            this.limit = JSON.parse(localStorage.getItem("limitList"))
            this.userid=localStorage.getItem('userId')
//
            var that=this
            that.getAllmessage()
        },
//        beforeDestroy(){
//            Bus.$off("closeA")
//        },
        methods: {
            go(){
                this.$router.go(-1)
            },
            getAllmessage(){
                var that = this
//				企业联络状态
                var stateCom={enterprise_id:this.id,userid:that.userid}
                console.log(stateCom)
                var statesCom = that.querystring.stringify(stateCom)
                _http.axiosRequest(that,that.apiPort.stateApi,statesCom,(res)=>{
                    that.allMessage=res.data.data
                console.log(res)
//                console.log(that.allMessage)
//                console.log(res.data.data)
            })
            },
            }
    }

</script>
<style scoped>
    .instance{
        margin-right:50px;
    }
</style>